Image forming apparatus, method of controlling the same, and storage medium

ABSTRACT

The present image forming apparatus selects an appropriate connection method in accordance with circumstances from a plurality of connection methods when communication with an information processing apparatus is established by short-range wireless communication, and notifies information necessary for performing communication by the selected connection method to the information processing apparatus via short-range wireless communication.

BACKGROUND OF THE INVENTION

Field of the Invention

The present invention relates to a communication image forming apparatuscomprising a short-range wireless communication function, a method ofcontrolling the same, and a storage medium.

Description of the Related Art

In recent years, NFC (Near Field Communication), which is one type ofshort-range wireless communication (non-contact communication) isspreading in various fields. NFC has a very short communication range;when devices that perform communication approach within a few cm of eachother, a wireless link is connected, and the wireless link isdisconnected when they move apart. In this way, for devices in which NFCis installed, it is possible to perform communication by causing them toapproach each other. For this reason, NFC can provide a convenientmethod for a user to simply use various services, and is attractingattention and being put to practical use in various fields.

As a technique in which NFC is used, there is a technique in whichcommunication is performed by just performing pairing betweeninformation processing apparatuses by NFC, and subsequently switching(performing a handover) to another connection method (BlueTooth(registered trademark), WiFi-Direct, a wireless LAN). As a usageapproach for such a handover, a method in which, in order for a userholding a mobile communication terminal to perform communication with anMFP (Multi-Function Printer) in front of the user, pairing between themobile communication terminal and the MFP is performed by NFC, and thencommunication is performed via a wireless LAN is known.

However, a case in which the MFP detected by NFC cannot communicate withthe mobile communication terminal by the wireless LAN for a reason ofnot being connected to a network or the like can be considered. JapanesePatent Laid-Open No. 2013-187568 proposes that a mobile communicationterminal list MFPs that can communicate by a wireless LAN, and if thereis an MFP detected by NFC in the list, perform communication with theMFP via the wireless LAN, and if there is no MFP detected by NFC in thelist, perform control to not perform a handover.

However, there is a problem with the above described conventionaltechnique as recited below. In the above described conventionaltechnique, when the MFP and the mobile communication terminal perform ahandover, the MFP uses one connection method that it supports as theconnection method to hand over communication from NFC to. However, thereexist circumstances in which connection methods cannot be used incommunication with the mobile communication terminal. For example, awireless LAN cannot be used when the mobile communication terminal doesnot have authorization to access a network that the MFP is connected to.Accordingly, a method that selects a connection method to which to handover communication by the handover so as to be able to use a connectionmethod suited to the circumstances is required.

SUMMARY OF THE INVENTION

The present invention enables realization of an arrangement of suitablyselecting a connection method that switches from short-range wirelesscommunication in accordance with circumstances of a connectingapparatus.

One aspect of the present invention provides an image forming apparatus,comprising: a short-range wireless communication unit configured toexecute short-range wireless communication; a wireless communicationunit operable in a first wireless communication mode in which the imageforming apparatus connects to an external access point, and a secondwireless communication mode in which the image forming apparatusoperates as an access point; a setting unit configured to set whether towrite first connection information corresponding to the first wirelesscommunication mode or second connection information corresponding to thesecond wireless communication mode to the short-range wirelesscommunication unit in accordance with a user instruction; and a writingunit configured to write one of the first connection information and thesecond connection information to the short-range wireless communicationunit in accordance with the setting by the setting unit.

Another aspect of the present invention provides an image formingapparatus, comprising: a short-range wireless communication unitconfigured to execute short-range wireless communication; a wirelesscommunication unit operable in a first wireless communication mode inwhich the image forming apparatus connects to an external access point,and a second wireless communication mode in which the image formingapparatus operates as an access point; a selection unit configured toselect either first connection information corresponding to the firstwireless communication mode or second connection informationcorresponding to the second wireless communication mode based on userinformation of a user that uses the image forming apparatus; and awriting unit configured to write the connection information selected bythe selection unit to the short-range wireless communication unit.

Still another aspect of the present invention provides a method forcontrolling an image forming apparatus comprising a short-range wirelesscommunication unit configured to execute short-range wirelesscommunication and a wireless communication unit operable in a firstwireless communication mode in which the image forming apparatusconnects to an external access point and a second wireless communicationmode in which the image forming apparatus operates as an access point,the method comprising: setting whether to write first connectioninformation corresponding to the first wireless communication mode orsecond connection information corresponding to the second wirelesscommunication mode to the short-range wireless communication unit inaccordance with a user instruction; and writing one of the firstconnection information and the second connection information to theshort-range wireless communication unit in accordance with the setting.

Yet still another aspect of the present invention provides anon-transitory computer-readable storage medium storing a computerprogram for causing a computer to execute a method for controlling animage forming apparatus comprising a short-range wireless communicationunit configured to execute short-range wireless communication and awireless communication unit operable in a first wireless communicationmode in which the image forming apparatus connects to an external accesspoint and a second wireless communication mode in which the imageforming apparatus operates as an access point, the method comprising:setting whether to write first connection information corresponding tothe first wireless communication mode or second connection informationcorresponding to the second wireless communication mode to theshort-range wireless communication unit in accordance with a userinstruction; and writing one of the first connection information and thesecond connection information to the short-range wireless communicationunit in accordance with the setting.

Still yet another aspect of the present invention provides a method forcontrolling an image forming apparatus comprising a short-range wirelesscommunication unit configured to execute short-range wirelesscommunication and a wireless communication unit operable in a firstwireless communication mode in which the image forming apparatusconnects to an external access point and a second wireless communicationmode in which the image forming apparatus operates as an access point,the method comprising: selecting either first connection informationcorresponding to the first wireless communication mode or secondconnection information corresponding to the second wirelesscommunication mode based on user information of a user that uses theimage forming apparatus; and writing the selected connection informationto the short-range wireless communication unit.

Yet still another aspect of the present invention provides anon-transitory computer-readable storage medium storing a computerprogram for causing a computer to execute a method for controlling animage forming apparatus comprising a short-range wireless communicationunit configured to execute short-range wireless communication and awireless communication unit operable in a first wireless communicationmode in which the image forming apparatus connects to an external accesspoint and a second wireless communication mode in which the imageforming apparatus operates as an access point, the method comprising:selecting either first connection information corresponding to the firstwireless communication mode or second connection informationcorresponding to the second wireless communication mode based on userinformation of a user that uses the image forming apparatus; and writingthe selected connection information to the short-range wirelesscommunication unit.

Further features of the present invention will be apparent from thefollowing description of exemplary embodiments with reference to theattached drawings.

BRIEF DESCRIPTION OF THE DRAWINGS

FIG. 1 is a schematic view that illustrates a communication system 100according to a first embodiment.

FIG. 2 is a block diagram for illustrating a hardware configuration ofan information processing apparatus 130 according to the firstembodiment.

FIG. 3 is a block diagram for illustrating a hardware configuration ofan image forming apparatus 140 according to the first embodiment.

FIG. 4 is a block diagram for illustrating a software configuration ofthe communication system 100 according to the first embodiment.

FIG. 5 is a view for illustrating an example of a screen for setting aconnection method used by a handover according to the first embodiment.

FIG. 6 is a flowchart that illustrates processing of a connection methodsetting unit 413 of the image forming apparatus 140 according to thefirst embodiment.

FIG. 7 is a flowchart illustrating processing concerning a communicationhandover in a handover of an NFC communication unit 213 of theinformation processing apparatus 130 according to the first embodiment.

FIG. 8 is a block diagram for illustrating a software configuration ofthe communication system 100 according to a second embodiment.

FIG. 9 is a view for illustrating an example of management informationheld by a user information management unit 813 according to the secondembodiment.

FIG. 10 is a flowchart that illustrates processing of the userinformation management unit 813 of the image forming apparatus 140according to the second embodiment.

FIG. 11 is a block diagram for illustrating a software configuration ofthe communication system 100 according to a third embodiment.

FIG. 12 is a flowchart that illustrates processing of an NFC controlunit 1112 of the image forming apparatus 140 according to the thirdembodiment.

FIG. 13 is a schematic view that illustrates the communication systemaccording to a fourth embodiment.

FIG. 14 is a block diagram for illustrating a software configuration ofthe communication system 100 according to the fourth embodiment.

FIG. 15 is a flowchart that illustrates processing of an NFC controlunit 1412 of the image forming apparatus 140 according to the fourthembodiment.

FIG. 16 is a block diagram for illustrating a software configuration ofthe communication system 100 according to a fifth embodiment.

FIG. 17 is a flowchart that illustrates processing of an NFC controlunit 1612 of the image forming apparatus 140 according to the fifthembodiment.

FIG. 18 is a schematic view illustrating a communication system 1800when the image forming apparatus 140 is connected to a network 110 bywire.

FIG. 19 is a view for illustrating an example of a setting screen of aconnection method used by a handover in FIG. 18.

DESCRIPTION OF THE EMBODIMENTS

Embodiments of the present invention will now be described in detailwith reference to the drawings. It should be noted that the relativearrangement of the components, the numerical expressions and numericalvalues set forth in these embodiments do not limit the scope of thepresent invention unless it is specifically stated otherwise.

First Embodiment

<System Configuration>

Below, with reference to FIG. 1 through FIG. 7, FIG. 18 and FIG. 19,explanation is given for a first embodiment of the present invention.Firstly, referring to FIG. 1, explanation is given for a configurationof a communication system according to the present embodiment.

Reference numeral 100 in the drawing is a communication system, which iscomprised of a network 110, an access point 120, an informationprocessing apparatus 130, and an image forming apparatus 140. In thepresent embodiment, the information processing apparatus 130 isenvisioned to be a mobile communication terminal such as a smart phone.In the present embodiment, the image forming apparatus 140 is envisionedto be an MFP (Multi-Function Printer), and is connected to the network110 via the access point 120. Note that, the present invention is notlimited to the configuration in the figure in regards to the systemconfiguration of a number or the like of the information processingapparatus, image forming apparatus or the access point, and may beappropriately changed in a scope in which the spirit of the presentinvention is not impaired. In addition, the information processingapparatus 130 and the image forming apparatus 140 can performshort-range wireless communication with each other, and thiscommunication is established when the information processing apparatus130 is positioned in the neighborhood of the image forming apparatus140.

<Information Processing Apparatus Hardware Configuration>

Next, FIG. 2 will give an explanation for a hardware configuration ofthe information processing apparatus 130 according to the firstembodiment. Note that the configuration of the information processingapparatus 130 explained below is only one example, and changes may bemade as appropriate in a scope in which the spirit of the presentinvention is not impaired.

The information processing apparatus 130 comprises a system control unit201, a communication unit 202, an audio output unit 203, an audio inputunit 204, a camera 205, a connector 206, and a storage 207. Furthermore,the information processing apparatus 130 comprises a touch screendisplay 208, buttons 209, an accelerometer 210, a direction sensor 211,a gyroscope 212, and an NFC communication unit 213.

The touch screen display 208 displays text, images, and graphics such asdiagrams, and detects a user operation (a tap, flick or the like by afinger or a stylus pen) performed with respect to the screen. Thebuttons 209 comprises a plurality of buttons that are operated by auser. The system control unit 201 detects operations (a click, adouble-click, a push, or the like) on buttons by cooperating with thebuttons 209. For example, for buttons, there is a home button, a powerON/OFF button, a volume button, or the like.

The communication unit 202 is a module that performs communication. Acommunication scheme performed by the communication unit 202 is inaccordance with a wireless communication standard. For example, aswireless communication standards, there are 2G, 3G, or 4G mobilewireless communication standards. BlueTooth, WiFi (IEEE 802.11), WiMAX,or the like, are other wireless communication standards. Thecommunication unit 202 can support a connection method of one or more ofthe above-described communication standards. In the present embodiment,the communication unit 202 supports a mobile wireless communicationstandard and WiFi.

The NFC communication unit 213 generates an electromagnetic field thatis capable of communication only at a short distance, and allowsshort-range wireless communication between devices equipped with NFC(Near Field Communication). In the present embodiment, this is an IC tagthat supports NFC. The audio output unit 203 outputs an audio signaltransmitted from the system control unit 201 as audio. The audio inputunit 204 converts audio of a user into an audio signal, and transmits itto the system control unit 201.

The storage 207 stores a program and data. For example, it stores acontrol program, an application, and setting data. The storage 207 isalso used as a work area that temporarily stores a result of processingof the system control unit 201. The storage 207 may include a storagedevice such as a semiconductor storage device or a magnetic storagedevice. The storage 207 may also include a plurality of types of storagedevices. The storage 207 may also combine a portable storage medium,such as a memory card, and an apparatus for reading the storage medium.Programs stored in the storage 207 include an application executed in aforeground or a background, and a control program that supports anoperation of an application. For example, applications causepredetermined screens to be displayed on the touch screen display 208,and cause processing to be executed by the system control unit 201 inaccordance with user operations detected by the touch screen display208.

The control program is, for example, an OS. The applications and thecontrol program are installed on the storage 207 via wirelesscommunication by the communication unit 202. The control programprovides functions relating to various control for causing theinformation processing apparatus 130 to operate. For example, thecontrol program realizes making a call by controlling the communicationunit 202, the audio output unit 203, the audio input unit 204, or thelike.

The system control unit 201 is, for example, a CPU (Central ProcessingUnit). The system control unit 201 may be an integrated circuit such asan SoC (System-on-a-chip) in which other components, such as thecommunication unit 202, are integrated. The system control unit 201comprehensively controls operation of the information processingapparatus 130, and realizes various functions. More specifically, thesystem control unit 201 executes an instruction included in a programstored on the storage 207, while referring to data stored on the storage207 as necessary. The system control unit 201 realizes the variousfunctions by controlling the touch screen display 208, the communicationunit 202, or the like. The system control unit 201 may change control inaccordance with a result of detection of various detection units such asthe touch screen display 208, the buttons 209, the accelerometer 210, orthe like. The system control unit 201 performs reading/writing withrespect to the NFC communication unit 213.

The camera 205 is an out-camera that captures an object. The connector206 is a terminal to which another apparatus is connected. The connector206 may be a general-purpose terminal, such as a USB (Universal SerialBus), HDMI (registered trademark) (High-Definition MultimediaInterface), Light Peak (Thunderbolt), or an earphone/microphoneconnector. The connector 206 may be an exclusively designed terminal,such as a dock connector. Apparatuses that are connected to theconnector 206 for example include an external storage, a speaker, and acommunication apparatus.

The accelerometer 210 detects a direction and a magnitude of anacceleration that acts on the information processing apparatus 130. Thedirection sensor 211 detects an orientation of geomagnetism. Thegyroscope 212 detects a rotation of the information processing apparatus130. Results of detection of the accelerometer 210, the direction sensor211, and the gyroscope 212 are used in combination to detect a change inposition and orientation of the information processing apparatus 130.

<Image Forming Apparatus Hardware Configuration>

Next, with reference to FIG. 3, explanation is given for a hardwareconfiguration of the image forming apparatus 140 according to thepresent embodiment. Note that the configuration of the image formingapparatus 140 explained below is only one example, and changes may bemade as appropriate in a scope in which the spirit of the presentinvention is not impaired.

The image forming apparatus 140 comprises a system control unit 301, aROM 302, a RAM 303, a scanner 304, an operation unit 305, a display unit306, and a communication control unit 307. Furthermore, the imageforming apparatus 140 comprises an external memory controller 308, anexternal storage apparatus 309, an NFC communication unit 310, a printcontrol unit 311, and a system bus 312.

The system control unit 301 is a processing apparatus, such as a CPU,and has a function of executing various processes that the image formingapparatus 140 performs. The ROM 302 is a nonvolatile storage device, inwhich various control programs of the image forming apparatus 140 andinitial setting values are stored. In the present embodiment, softwarethat the image forming apparatus 140 has is stored on the ROM 302, andas necessary is stored in the RAM 303 and then executed. The RAM 303 isa volatile storage device, and is used as a work area for the variousprocesses that the image forming apparatus 140 performs. In the presentembodiment, software that the image forming apparatus 140 has is storedin the RAM 303 and then executed.

The scanner 304 is an image reading unit for reading an image printed onpaper (a recording medium). In many cases, an automatic document feederis attached to the scanner 304 as an option, and it is possible toautomatically read a plurality of original pages. The operation unit 305is an input apparatus such as a button, and the system control unit 301continuously monitors its input state. The display unit 306 is a displayapparatus such as an LED or an LCD, and performs display in accordancewith control by the system control unit 301.

The communication control unit 307 is a connector for USB, a network, orthe like, and a control apparatus therefor, and performs control ofinput and output with respect to an external unit in accordance withcontrol from the system control unit 301. In the present embodiment, thecommunication control unit 307 supports USB communication and networkcommunication, such as a wired/wireless LAN, WiFi-Direct (a standard inwhich a WiFi device itself can perform the role of an access point), orthe like. The external memory controller 308 performs control of inputand output or the like with respect to the external storage apparatus309, which is a hard disk or the like. The NFC communication unit 310generates an electromagnetic field by which communication is possible ata short distance, and enables short-range wireless communication betweendevices that are NFC equipped. In the present embodiment, this is anRFID reader/writer.

The print control unit 311 comprises apparatuses for actually printingan image to a sheet, such as a fixing device system, a laser beamcontrol system, and a paper conveyance system (not shown); a detectionapparatus that detects printing success, an occurrence of an error, orthe like; and a serial communication apparatus for communicating withthe system control unit 301. The system bus 312 is a bus to which thepreviously described system control unit 301, ROM 302, RAM 303, scanner304, operation unit 305, display unit 306, communication control unit307, external memory controller 308, NFC communication unit 310, and theprint control unit 311 are attached.

<Software Configuration>

Next, with reference to FIG. 4, explanation is given for a configurationof software of the communication system 100 according to the presentembodiment. Note that the software configuration explained below is onlyone example, and changes may be made as appropriate in a scope in whichthe spirit of the present invention is not impaired.

The information processing apparatus 130 has an application 400. Theapplication 400 is stored in the storage 207, and is executed by thesystem control unit 201 as necessary. The application 400 is comprisedby a communication control unit 401 and an NFC control unit 402. The NFCcontrol unit 402 uses the NFC communication unit 213 to performcommunication with the NFC communication unit 310 of the image formingapparatus 140. In the present embodiment, the NFC control unit 402obtains information (hereinafter, referred to as connection information)necessary for switching communication by a handover by performingcommunication with the NFC communication unit 310. The communicationcontrol unit 401 performs communication, via the communication unit 202,with a communication control unit 411 of the image forming apparatus140, based on the connection information that the NFC control unit 402obtained.

The image forming apparatus 140 comprises the communication control unit411, a NFC control unit 412, and a connection method setting unit 413.The communication control unit 411 performs communication with thecommunication control unit 401 via the communication control unit 307.The connection method setting unit 413 can set the connection methodused in the handover in accordance with a user input. More specifically,when the user calls for setting of a connection method by the operationunit 305, the connection method setting unit 413 causes a setting screen(FIG. 5) to be displayed on the display unit 306, and the connectionmethod designated by the user by the setting screen is stored in the RAM303 as the connection method to be used in a handover.

The NFC control unit 412 writes the connection method to be used in thehandover and the connection information relating to the connectionmethod to an IC tag of the NFC communication unit 310. This is performedupon power supply activation of the image forming apparatus 140, or whenthe connection method to be used in the handover is changed. Theconnection information written by the NFC control unit 412 isinformation necessary for the information processing apparatus 130 toswitch communication in the handover. In the present embodiment,connection information for when WiFi-Direct is set is, for example, aname of an access point for WiFi-Direct that the communication controlunit 307 comprises. In addition, the connection information for whenwireless LAN is set is, for example, the name of the access point 120that the image forming apparatus 140 uses, an IP address of the imageforming apparatus 140, or the like.

Note that, according to the present invention, a data format for whenthe NFC control unit 412 writes the connection method and the connectioninformation to the IC tag may be any format to the extent that thespirit of the present invention is not impaired. For example, it may bea generic format such as NDEF (NFC Data Exchange Format), or it may bean independent format that is only accepted between the NFC control unit402 and the NFC control unit 412. In the present embodiment, anindependent format that writes the connection method and the connectioninformation to a particular address of the IC tag is used.

<Setting Screen>

Next, with reference to FIG. 5, explanation is given of a screen forsetting the connection method used in the handover according to thepresent embodiment. A connection method setting screen 500 comprises anOK button 501, a connection method check-box 502, an AP settingcheck-box 503, a connected AP display box 504, and an AP input box 505.

The connection method check-box 502 displays on the display unit a UIfor display control by which the user can select one connection methodfrom usable connection methods. In the present embodiment, for theconnection method check-box 502, it is possible to select WiFi-Directand a wireless LAN. In other words, the user can select one ofWiFi-Direct and wireless LAN as the connection method.

In the present embodiment, when WiFi-Direct of the image formingapparatus 140 cannot be used, the box for WiFi-Direct is displayed asgrayed out and controlled to be unselectable, as illustrated by aconnection method check-box 1902 of FIG. 19. Note that for FIG. 19, theimage forming apparatus 140 illustrated in FIG. 18 does not have thewireless communication function, and illustrates a concrete example 1900of the screen for setting the connection method in a communicationsystem 1800 connected by wire to the network 110. A detailed explanationof FIG. 18 and FIG. 19 is similar to FIG. 1 and FIG. 5, and thus isomitted.

The AP setting check-boxes 503, 504 are settable when wireless LAN isselected via the connection method check-box 502, and provide a UI bywhich it is possible to select an AP setting method used upon a wirelessLAN connection. Note that when the image forming apparatus 140 does nothave AP information for connecting to the network 110, only the item 504in which a user manually inputs the AP information is selectable. In acase such as when the image forming apparatus 140 is connected to theaccess point 120, and when the image forming apparatus 140 has APinformation for connecting to the network 110, the item 503, which usesthis information, is also selectable. When the image forming apparatus140 has AP information for connecting to the network 110, thisinformation is displayed on the AP display box 505 for the AP to whichthe image forming apparatus 140 is connected. In the present embodiment,it is possible to select whether to use the AP information that theimage forming apparatus 140 is using, or to use AP information that theuser inputs manually.

In the present embodiment, a case in which the image forming apparatus140 does not have information of the access point 120, as in thecommunication system 1800 illustrated in FIG. 18, is envisioned. In thiscase, as illustrated by an AP setting check-box 1903 and a connected APdisplay box 1905 of FIG. 19, the setting to use the connected AP isdisplayed as gray-out, and controlled to be unselectable. In the case inwhich the user has selected to input the AP information via the APsetting check-box 503, the user inputs the AP information in the APinput box 505. By pressing the OK button 501, the user can instructsetting completion.

<Processing of the Image Forming Apparatus>

Next, with reference to FIG. 6, explanation is given for a processingprocedure of the connection method setting unit 413 of the image formingapparatus 140 according to the present embodiment. This processing isstarted when a call for the setting screen of the connection method isinstructed from the operation unit 305 of the image forming apparatus140. Note that the processing explained below is realized by the systemcontrol unit 301 reading a control program stored in the ROM 302 or theexternal storage apparatus 309 into the RAM 302 and executing it.

In step S601, the connection method setting unit 413 refers toinformation that the communication control unit 307 has, confirms aconnection method that can be used in a communication handover in ahandover, and the processing transitions to step S602. In the presentembodiment, of the connection methods that the communication controlunit 307 supports, wireless LAN and WiFi-Direct are usable connectionmethods. Continuing on, in step S602, the connection method setting unit413 displays the previously described setting screen of FIG. 5 on thedisplay unit 306, and the processing transitions to step S603. In otherwords, here the connection methods that the communication control unit307 supports are displayed on the setting screen as selectable.

In step S603, the connection method setting unit 413 determines whetherthe OK button 501, which means setting finalization, has been pressed.If not pressed, the determination of step S603 is repeated, and ifpressed the processing transitions to step S604. In step S604, theconnection method setting unit 413 stores in the RAM 303 the connectionmethod input into the connection method setting screen 500 when the OKbutton 501 is pressed, as the connection method used in a handover. Theprocessing then transitions to step S605. In step S605, the connectionmethod setting unit 413 writes the connection method and the connectioninformation to be used in a handover to the IC tag of the NFCcommunication unit 310, and the processing terminates.

<Processing of the Information Processing Apparatus>

Next, with reference to FIG. 7, explanation is given for a processingprocedure regarding communication handover in a handover of the NFCcommunication unit 213 of the information processing apparatus 130according to the present embodiment. This processing is started when theNFC communication unit 213 of the information processing apparatus 130and the NFC communication unit 310 of the image forming apparatus 140approach each other, and communication according to NFC starts. Notethat the processing explained below is realized by the system controlunit 201 reading the control program stored in the storage 207 andexecuting it.

In step S701, the application 400 performs reading of the IC tag of theNFC communication unit 310 via the NFC control unit 402. When thereading completes, the processing transitions to step S702. In stepS702, the application 400 determines whether the connection method andthe connection information for switching communication via the handoverare in the data that was read. If the connection method and theconnection information are present, transition is made to step S703. Ifnot present, the handover is not performed, and this processingterminates.

In step S703, the application 400 determines whether the connectionmethod read from the IC tag is a connection method supported by thecommunication unit 202. If the connection method is supported,transition is made to step S704; if not the handover is not performedand this processing terminates. In step S704, based on the connectionmethod and the connection information read from the IC tag, theapplication 400 starts communication with the image forming apparatus140 via the communication control unit 401, and switches communicationfrom NFC to the connection method (executes the handover). In otherwords, here either a switch is made from NFC to communication inaccordance with the wireless LAN or WiFi-Direct, or the processingterminates without switching the connection method from NFC.Subsequently this processing terminates.

As explained above, because the image forming apparatus according to thepresent embodiment can set the connection method that the communicationis switched to by the handover, the user can use a connection methodsuitable to circumstances of the communication system 100.

Second Embodiment

Below, with reference to FIG. 8 through FIG. 10, explanation is givenfor a second embodiment of the present invention. The present embodimentdiffers from the above described first embodiment that prepares a screenfor setting the connection method, and explanation is given for anexample in which management information registered in advance and userinformation that is user input are used, and a connection method andconnection information in accordance with the user information arewritten to the IC tag. Below, differences with the above described firstembodiment are mainly explained, and explanation of portions that aresimilar to the above described first embodiment are omitted. An overviewof the communication system according to the present embodiment issimilar to FIG. 1, which is explained in the above described firstembodiment. However, in the present embodiment the network 110 is anetwork to which only limited users have an access authority. Thehardware configuration of the information processing apparatus 130 andthe image forming apparatus 140 is similar to in the above describedfirst embodiment, and so explanation thereof is omitted.

<Software Configuration>

With reference to FIG. 8, explanation is given for a softwareconfiguration of the communication system 100 according to the presentembodiment. The information processing apparatus 130 is similar to as inthe above described first embodiment, so explanation thereof is omitted.

The image forming apparatus 140 comprises a communication control unit811, an NFC control unit 812, a user information management unit 813,and a user information input unit 814. The communication control unit811 performs communication with the communication control unit 401 viathe communication control unit 307. The NFC control unit 812 receives anotification from the user information management unit 813 and writes tothe IC tag of the NFC communication unit 310 the connection method to beused in a handover and the connection information relating to theconnection method. Regarding writing to the IC tag, because it issimilar to in the above described first embodiment, explanation thereofis omitted.

The user information input unit 814 displays on the display unit 306 ascreen that prompts for user information input, and receives input ofuser information from the operation unit 305. When the user informationinput unit 814 receives input of user information, notifies the userinformation management unit 813. In the present embodiment, the userinformation is a user name. The user information management unit 813 hasmanagement information that links the user information and theconnection method usable in handovers. The information may be stored inthe RAM 303, or may be stored in an external storage apparatus of aserver or the like via a network. In the present embodiment, of theconnection methods that the communication control unit 307 supports,wireless LAN and WiFi-Direct are the connection methods usable inhandovers.

In the present embodiment, the user information management unit 813 hasthe management information illustrated in FIG. 9, and it is stored inthe RAM 303. The user information management unit 813 receives thenotification of the user information from the user information inputunit 814, compares it against the management information, and determineswhether there is a privilege to access the network. The connectionmethod to be used in a handover is selected in accordance with theresult of this determination, and the selected connection method isnotified to the NFC control unit 812. In the present embodiment, forusers having authorization to access the network 110, the wireless LANis selected as the connection method; for all other users, WiFi-Directis selected.

<Management Information>

With reference to FIG. 9, explanation is given for an example of themanagement information that the user information management unit 813has. In the present embodiment, user names and privileges to access thenetwork 110 are linked and managed. In the example of FIG. 9, a user Ahas an access privilege, and the user B does not have an accessprivilege. Accordingly, wireless LAN is selected as the connectionmethod for the user A, and WiFi-Direct is selected as the connectionmethod for the user B.

<Processing of the Image Forming Apparatus>

Next, with reference to FIG. 10, explanation is given for a processingprocedure of the user information management unit 813 of the imageforming apparatus 140 according to the present embodiment. Thisprocessing is started when the user information is notified from theuser information input unit 814 to the user information management unit813. Note that the processing explained below is realized by the systemcontrol unit 301 reading the control program stored in the ROM 302 orthe external storage apparatus 309 into the RAM 203 and executing it.

In step S1001, the user information management unit 813 compares theuser name included in the user information notified from the userinformation input unit 814 and the user names in the managementinformation that the user information management unit 813 manages, and atransition is made to step S1002. In step S1002, the user informationmanagement unit 813 determines whether there is an item of having thesame user name as the user name that is notified in the managementinformation, based on the result of the comparing in step S1001. Ifpresent, transition is made to step S1003; if not present, transition ismade to step S1005. For example, in a case of the present embodiment, ifthe notified user name is “user A” or “user B”, it is determined that anitem of the same user name is present in the management information; ifthe notified user name is “user C” then it is determined not to bepresent.

In step S1003, the user information management unit 813 refers toinformation of a network access privilege that is linked to the notifieduser name. If the access privilege is present transition is made to stepS1004, if not present transition is made to step S1005. For example, inthe case of the present embodiment, if the notified user name is “userA” then it is determined that the access privilege is present, and if itis “user B” then it is determined that the access privilege is notpresent.

In step S1004, the user information management unit 813 selects wirelessLAN as the connection method, and transition is made to step S1006. Instep S1005, the user information management unit 813 selects WiFi-Directas the connection method, and transition is made to step S1006. In stepS1006, the user information management unit 813 notifies the connectionmethod selected in the previous step to the NFC control unit 812, andthis processing terminates.

Note that, for the present embodiment, because there are two types ofconnection methods usable in handovers, the management information onlymanages the existence/absence of authorization regarding one of theconnection methods, and the other connection method is used when themanaged connection method cannot be used. However, the present inventionis not limited to the case of two types of connection method asillustrated in the present embodiment, and the configuration of themanagement information and the processing of the user informationmanagement unit 813 may be appropriately changed within a scope in whichthe spirit of the present invention is not undermined.

As explained above, according to the present embodiment, it is possibleto use a connection method suitable for each user as the connectionmethod to which to switch communication in a handover.

Third Embodiment

Below, with reference to FIG. 11 through FIG. 12, explanation is givenfor a third embodiment of the present invention. The present embodimentdiffers from the above described first and second embodiments in thatthe information processing apparatus 130 notifies the connection methoddesired to be used in handovers to the image forming apparatus 140, andthe image forming apparatus 140 writes connection information to the ICtag in accordance with the notified connection method. Below,differences with the above described first embodiment are mainlyexplained, and explanation of portions that are similar to the abovedescribed first embodiment are omitted. An overview of the communicationsystem according to the present embodiment is similar to FIG. 1, whichis explained in the above described first embodiment. The hardwareconfigurations of the information processing apparatus 130 and the imageforming apparatus 140 are similar to in the above described firstembodiment, and so explanation thereof is omitted.

<Software Configuration>

Next, with reference to FIG. 11, explanation is given for a softwareconfiguration of the communication system 100 according to the presentembodiment. The information processing apparatus 130 has an application1100. The application 1100 is stored in the storage 207, and is executedby the system control unit 201 as necessary. The application 1100comprises a communication control unit 1101, an NFC control unit 1102,and a connection method selection unit 1103. The connection methodselection unit 1103 selects the connection method to use in a handoverin accordance with a user input, and notifies the selected connectionmethod to the image forming apparatus 140.

More specifically, the connection method selection unit 1103 has a listof the connection methods that can be used in the handover, and when theuser instructs selection of the connection method to the application1100, the list is displayed on the touch screen display 208. The listmay be held in advance by the application 1100, or may be dynamicallygenerated by the application 1100 referring to the connection methodsthat the information processing apparatus 130 or the image formingapparatus 140 support. In the present embodiment, the above describedlist is something that the application 1100 has in advance, and wirelessLAN and WiFi-Direct are included as items in the list.

The connection method selection unit 1103 notifies the connection methodthat the user selected from the displayed connection methods to theimage forming apparatus 140 via the NFC control unit 1102. In thepresent embodiment, the notification of the connection method is assumedto be writing information of the connection method to a particularaddress of the IC tag of the NFC communication unit 310. The NFC controlunit 1102 uses the NFC communication unit 213 to perform communicationwith the NFC communication unit 310 of the image forming apparatus 140.In the present embodiment, by performing communication with the NFCcommunication unit 310, the NFC control unit 1102 performs notificationof the connection method and obtaining of the connection information.

The communication control unit 1101 performs communication, via thecommunication unit 202, with a communication control unit 1111, based onthe connection information that the NFC control unit 1102 obtained. Theimage forming apparatus 140 comprises the communication control unit1111 and an NFC control unit 1112. The communication control unit 1111performs communication with the communication control unit 1101 via thecommunication control unit 307. The NFC control unit 1112 periodicallyrefers to the NFC communication unit 310, and confirms whether theconnection method has been notified from the NFC control unit 1102.

In the present embodiment, confirmation of notification of theconnection method is assumed to be confirmation as to whether there is achange to information that indicates the connection method and iswritten to a particular address of an IC tag of the NFC communicationunit 310. Furthermore the NFC control unit 1112 confirms whether thenotified connection method can be supported by the image formingapparatus 140, and if determined to be supportable, the connectioninformation regarding the connection method is written to the IC tag ofthe NFC communication unit 310. In the present embodiment, if thenotified connection method is present among network connection methodsthat are supported by the communication control unit 307, the NFCcontrol unit 1112 determines that it can be supported.

<Processing of the Image Forming Apparatus>

Next, with reference to FIG. 12, explanation is given for a processingprocedure of the NFC control unit 1112 of the image forming apparatus140 according to the present embodiment. This processing is started upona power supply activation of the image forming apparatus 140. Duringoperation of the image forming apparatus 140, this processing iscontinuously performed. Note that the processing explained below isrealized by the system control unit 301 reading a control program storedin the ROM 302 or the external storage apparatus 309 into the RAM 203and executing it.

In step S1201, the NFC control unit 1112 confirms the IC tag todetermine whether notification of the connection method has beenperformed. The processing then transitions to step S1202. In step S1202,the NFC control unit 1112 determines whether notification of theconnection method has been performed. If the notification has beenperformed transition is made to step S1203; if there is no notification,transition is made to step S1201.

In step S1203, the NFC control unit 1112 determines whether the imageforming apparatus 140 can support the notified connection method. If itcan be supported transition is made to step S1204; if it cannot besupported, transition is made to step S1201. In the present embodiment,as described in the explanation of the NFC control unit 1112 of FIG. 11,if a connection method that the communication control unit 307 supportsis notified, then it is supportable. In step S1204, the NFC control unit1112 writes connection information corresponding to the connectionmethod to the IC tag, and transition is made to step S1201. Regardingwriting to the IC tag, because it is similar to in the above describedfirst embodiment, explanation thereof is omitted.

As explained above, according to the present embodiment, by theinformation processing apparatus 130 instructing a connection method tobe used in the handover, it is possible to use a connection methodsuited to the user of the information processing apparatus 130.

Fourth Embodiment

Below, with reference to FIG. 13 through FIG. 15, explanation is givenfor a fourth embodiment of the present invention. The present embodimentdiffers to the above described first through third embodiments, and aconnection method suited to the circumstances is automatically selectedfrom connection methods that the image forming apparatus 140 supports.More specifically, when a notification that communication has terminatedis received, control is performed so as to select by default WiFi-Directby which communication is possible even without an access privilege, andcontrol is performed to switch the connection method when communicationby another connection method is requested. Below, differences with theabove described first embodiment are mainly explained, and explanationof portions that are similar to the above described first embodiment areomitted.

<System Configuration>

Firstly, referring to FIG. 13, explanation is given of the communicationsystem according to the present embodiment. Reference numeral 100 in thedrawing is the communication system, which is comprised of the network110, the access point 120, the information processing apparatus 130, andthe image forming apparatus 140. Because the network 110, the accesspoint 120, the information processing apparatus 130, and the imageforming apparatus 140 are similar to in the above described firstembodiment, explanation thereof is omitted. A print instructingapparatus 1301 is connected via the network 110 so that it is able tocommunicate with the image forming apparatus 140, and transmits printdata to the image forming apparatus 140 in accordance with an operationof a user.

The hardware configurations of the information processing apparatus 130and the image forming apparatus 140 are similar to in the abovedescribed first embodiment, and so explanation thereof is omitted.However, when the communication control unit 307 in the presentembodiment uses one of the supported network connection methods toperform communication, another network connection method cannot be used.

<Software Configuration>

Next, with reference to FIG. 14, explanation is given for a softwareconfiguration of the communication system 100 according to the presentembodiment. The information processing apparatus 130 has the application400. The application 400 comprises the communication control unit 401and the NFC control unit 402. Because the application 400, thecommunication control unit 401, and the NFC control unit 402 are similarto in the above described first embodiment, explanation thereof isomitted.

The image forming apparatus 140 comprises a communication control unit1411 and an NFC control unit 1412. The communication control unit 1411performs communication with the communication control unit 401 or theprint instructing apparatus 1301 via the communication control unit 307.When starting communication, the communication control unit 1411notifies the connection method to be used to the NFC control unit 1412.When communication terminates, the communication control unit 1411notifies communication termination to the NFC control unit 1412. The NFCcontrol unit 1412 receives the notification of the connection methodfrom the communication control unit 1411, selects the connection methodmost suited to be used in a handover, and writes the selected connectionmethod and the connection information to the IC tag of the NFCcommunication unit 310.

In the present embodiment, the NFC control unit 1412 selects, from theconnection methods that the communication control unit 307 supports, theconnection method for no inconvenience occurs when using the connectionmethod and furthermore has the highest possibility that the user of theinformation processing apparatus 130 can use it when it is used in ahandover. In other words, the NFC control unit 1412 normally selectsWiFi-Direct, which is capable of communication even when the user doesnot have a privilege to access the network 110 of the informationprocessing apparatus 130 Accordingly, when a simple termination ofcommunication is received, WiFi-Direct is selected. However, only when aconnection by wireless LAN is notified from the communication controlunit 1411, wireless LAN is selected to avoid interrupting wireless LANcommunication for communication that is in progress currently, by usingWiFi-Direct in a handover. In other words, if connection by wireless LANis notified from the communication control unit 1411, for examplecircumstances in which wireless LAN communication is currently beingperforming are envisioned, and maintaining that connection method isenvisioned. In this way, by virtue of the present invention, the imageforming apparatus 140 selects the connection method according to thecurrent communication circumstances.

<Processing of the Image Forming Apparatus>

Next, with reference to FIG. 15, explanation is given for a processingprocedure of the NFC control unit 1412 of the image forming apparatus140 according to the present embodiment. This processing is started whena notification of the connection method is received from thecommunication control unit 1411. Note that the processing explainedbelow is realized by the system control unit 301 reading a controlprogram stored in the ROM 302 or the external storage apparatus 309 intothe RAM 203 and executing it.

In step S1501, the communication control unit 1411 determines whetherthe received notification is a termination of communication. If it is acommunication termination, transition is made to step S1504; otherwise,transition is made to step S1502. In step S1502, the communicationcontrol unit 1411 determines whether the notified connection method iswireless LAN. If it is wireless LAN, transition is made to step S1503;otherwise, transition is made to step S1504. In step S1503, thecommunication control unit 1411 selects wireless LAN as the connectionmethod, and transition is made to step S1505.

Meanwhile, in step S1504 the communication control unit 1411 selectsWiFi-Direct as the connection method, and transition is made to stepS1505. In step S1505, the communication control unit 1411 writes theconnection method selected in the previous step (step S1503 or stepS1504) and the connection information corresponding to the connectionmethod to the IC tag. Regarding details of the writing to the IC tag,because it is similar to in the above described first embodiment,explanation thereof is omitted.

As explained above, by virtue of the present embodiment, it is possiblefor the information processing apparatus 130 to normally use in ahandover the connection method most likely to be usable, but to useanother connection method to avoid inconvenience if inconvenience occursdue to using the connection method.

Fifth Embodiment

Below, with reference to FIG. 16 and FIG. 17, explanation is given for afifth embodiment of the present invention. The present embodiment is avariation of the above-described first through fourth embodiments, andselects a replacement connection method from usable connection methodsif a connection method that the communication control unit 307 supportscannot be used for any reason. In the present embodiment, differenceswith the above described first embodiment are recited as a focus, andexplanation of portions that are similar to the above described firstembodiment are omitted. A schematic view of the communication systemaccording to the present embodiment is illustrated in FIG. 1, similarlyto in the above described first embodiment. The hardware configurationsof the information processing apparatus 130 and the image formingapparatus 140 are similar to in the above described first embodiment,and so explanation thereof is omitted.

<Software Configuration>

Next, with reference to FIG. 16, explanation is given for a softwareconfiguration of the communication system 100 according to the presentembodiment. The information processing apparatus 130 has the application400. The application 400 comprises the communication control unit 401and the NFC control unit 402. Because the application 400, thecommunication control unit 401, and the NFC control unit 402 are similarto in the above described first embodiment, explanation thereof isomitted. The image forming apparatus 140 comprises a communicationcontrol unit 1611, an NFC control unit 1612, and a connection methodmonitoring unit 1613.

The connection method monitoring unit 1613 uses the communicationcontrol unit 307 to monitor whether the connection methods that thecommunication control unit 307 supports are in a usable state. Morespecifically, a connection state with a connector or the access point120, the validity/invalidity of a function in a device setting of theimage forming apparatus 140, or the like is constantly monitored. Forexample, if a LAN cable is detached from the connector, wired LAN isunusable, if the connection with the access point 120 is cut wirelessLAN is unusable, and if WiFi-Direct becomes inactive in device settingsof the image forming apparatus 140, WiFi-Direct is unusable. If there isa change in the connection method usable state, the connection methodmonitoring unit 1613 notifies this to the NFC control unit 1612. Thecommunication control unit 1611 performs communication with thecommunication control unit 401 via the communication control unit 307.The NFC control unit 1612 writes the connection method to be used in thehandover and the connection information relating to the connectionmethod to the IC tag of the NFC communication unit 310.

Upon receiving the notification from the connection method monitoringunit 1613, the NFC control unit 1612 confirms whether the connectionmethod selected as the connection method to be used in the handover isunusable. If it is unusable, it is displayed that the selectedconnection method is unusable on the display unit 306, a suitableconnection method is re-selected from the usable connection methods asnecessary, and the connection method and the connection information arewritten to the IC tag. If no usable connection method remains, the NFCcontrol unit 1612 deletes the connection method and the connectioninformation from the IC tag. In the present embodiment, the twoconnection methods that can be used in a handover, out of connectionmethods that the communication control unit 307 supports, are wirelessLAN and WiFi-Direct. Accordingly, in a case where either becomesunusable, the other is re-selected as the connection method if it isusable.

<Processing of the Image Forming Apparatus>

Next, with reference to FIG. 17, explanation is given for a processingprocedure of the NFC control unit 1612 of the image forming apparatus140 according to the present embodiment. This processing is started whennotification of the usable state is received from the connection methodmonitoring unit 1613. Note that the processing explained below isrealized by the system control unit 301 reading the control programstored in the ROM 302 or the external storage apparatus 309 into the RAM203 and executing it.

In step S1701, the connection method monitoring unit 1613 determineswhether it has been notified that all connection methods are unusable.If all are unusable transition is made to step S1705, otherwisetransition is made to step S1702. In step S1702, the connection methodmonitoring unit 1613 confirms whether it has been notified that theselected connection method is unusable. If it is unusable, transition ismade to step S1703; if it is usable, transition is made to step S1707.Note that the selected connection method is the connection methodselected in the above-described the first through fourth embodiments,and differs to the connection method to be re-selected in step S1704which is explained later.

In step S1703, the connection method monitoring unit 1613 displays onthe display unit 306 to the effect that the selected connection methodcannot be used. The processing then transitions to step S1704. In stepS1704, the connection method monitoring unit 1613 re-selects theconnection method and stores it in the ROM 302. The connectioninformation corresponding to the re-selected connection method is thenwritten to the IC tag, and this processing terminates. In the presentembodiment, this step is taken when, out of the wireless LAN andWiFi-Direct, one selected as the connection method becomes unusable andthe other is usable. Accordingly, in this step the usable one isre-selected as the connection method, and the re-selected connectionmethod and the connection information are written to the IC tag.

In step S1705, the connection method monitoring unit 1613 displays onthe display unit 306 to the effect that the selected connection methodcannot be used, and transition is made to step S1706. In step S1706,because the handover cannot be performed, the connection methodmonitoring unit 1613 deletes the connection method and the connectioninformation from the IC tag. Subsequently this processing terminates.Meanwhile, in step S1707, the connection method monitoring unit 1613re-selects the connection method, writes the connection method and theconnection information to the IC tag, and this processing terminates.

As explained above, by virtue of the present embodiment, it is possibleto use a suitable connection method to perform a handover even when aconnection method of the image forming apparatus 140 cannot be used.

Other Embodiments

The present invention is not limited to the embodiments described above,and various modifications are possible. For example, a case in which theimage forming apparatus 140 is connected to the network 110 and thewired LAN without passing through the access point 120, as in thecommunication system 1800 illustrated in FIG. 18, can be considered. Insuch a case, the image forming apparatus 140 can use the wired LANinstead of the wireless LAN as the connection method used in thehandover. However, even when the wired LAN is used as the connectionmethod used in the handover, because the information processingapparatus 130 connects to the network 110 by wireless communication, itis necessary to write information of the access point 120 that isconnected to the network 110 as the connection information. However,because the image forming apparatus 140 is connected to the network 110by wire without passing through the access point 120, it is not possibleto obtain the information of the access point 120 from a network settingof the image forming apparatus 140.

Accordingly, in the present embodiment, a configuration is providedwhereby, when the image forming apparatus 140 is connected to thenetwork 110 by the wired LAN, the information of the access point usedas the connection information is set in the image forming apparatus 140.More specifically, in a case where the user has instructed, from theoperation unit 305, a setting of the access point for the handover, theimage processing apparatus 130 displays an access point informationinput screen on the display unit 306, and receives input of access pointinformation from the user. When the wired LAN is used in the handover,the image forming apparatus 140 uses the access point information inputfrom the user as the connection information. Note that the access pointinformation input screen may be just a screen for inputting the accesspoint, or, for example, may enable input as a part of the connectionmethod selection as illustrated in FIG. 5 or FIG. 19.

Embodiment(s) of the present invention can also be realized by acomputer of a system or apparatus that reads out and executes computerexecutable instructions (e.g., one or more programs) recorded on astorage medium (which may also be referred to more fully as a‘non-transitory computer-readable storage medium’) to perform thefunctions of one or more of the above-described embodiment(s) and/orthat includes one or more circuits (e.g., application specificintegrated circuit (ASIC)) for performing the functions of one or moreof the above-described embodiment(s), and by a method performed by thecomputer of the system or apparatus by, for example, reading out andexecuting the computer executable instructions from the storage mediumto perform the functions of one or more of the above-describedembodiment(s) and/or controlling the one or more circuits to perform thefunctions of one or more of the above-described embodiment(s). Thecomputer may comprise one or more processors (e.g., central processingunit (CPU), micro processing unit (MPU)) and may include a network ofseparate computers or separate processors to read out and execute thecomputer executable instructions. The computer executable instructionsmay be provided to the computer, for example, from a network or thestorage medium. The storage medium may include, for example, one or moreof a hard disk, a random-access memory (RAM), a read only memory (ROM),a storage of distributed computing systems, an optical disk (such as acompact disc (CD), digital versatile disc (DVD), or Blu-ray Disc (BD)™),a flash memory device, a memory card, and the like.

While the present invention has been described with reference toexemplary embodiments, it is to be understood that the invention is notlimited to the disclosed exemplary embodiments. The scope of thefollowing claims is to be accorded the broadest interpretation so as toencompass all such modifications and equivalent structures andfunctions.

This application claims the benefit of Japanese Patent Application No.2014-232939 filed on Nov. 17, 2014, which is hereby incorporated byreference herein in its entirety.

What is claimed is:
 1. An image forming apparatus, comprising: ashort-range wireless communicator configured to execute short-rangewireless communication; a wireless communicator operable in a firstwireless communication mode in which the image forming apparatusconnects to an external access point, and a second wirelesscommunication mode in which the image forming apparatus operates as anaccess point, wherein a wireless communication being implemented by thefirst wireless communication mode and a wireless communication beingimplemented by the second wireless communication mode are different fromthe short-range wireless communication; a memory that storescomputer-executable instructions; and at least one processor thatexecutes the computer-executable instructions to: select, based onsetting information of the image forming apparatus, which of firstconnection information corresponding to the first wireless communicationmode and second connection information corresponding to the secondwireless communication mode is to be written to the short-range wirelesscommunicator such that the connection information written to theshort-range wireless communicator is readable by an external apparatus;and write connection information selected from among the firstconnection information corresponding to the first wireless communicationmode in which the image forming apparatus connects to the externalaccess point and the second connection information corresponding to thesecond wireless communication mode in which the image forming apparatusoperates as the access point to the short-range wireless communicator.2. The image forming apparatus according to claim 1, wherein the firstconnection information includes an SSID of an external access point. 3.The image forming apparatus according to claim 1, wherein the secondconnection information includes an SSID corresponding to the secondwireless communication mode.
 4. The image forming apparatus according toclaim 1, wherein the second wireless communication mode is a mode thatexecutes wireless communication according to Wi-Fi Direct.
 5. The imageforming apparatus according to claim 1, wherein the short-range wirelesscommunicator has an IC tag, and the processor writes the connectioninformation selected from among the first connection information and thesecond connection information to the IC tag.
 6. A method for controllingan image forming apparatus comprising a short-range wirelesscommunicator configured to execute short-range wireless communication, awireless communicator operable in a first wireless communication mode inwhich the image forming apparatus connects to an external access pointand a second wireless communication mode in which the image formingapparatus operates as an access point, wherein a wireless communicationbeing implemented by the first wireless communication mode and awireless communication being implemented by the second wirelesscommunication mode are different from the short-range wirelesscommunication, and a processor, the method comprising: selecting, basedon setting information of the image forming apparatus, which of firstconnection information corresponding to the first wireless communicationmode and second connection information corresponding to the secondwireless communication mode is to be written to the short-range wirelesscommunicator such that the connection information written to theshort-range wireless communicator is readable by an external apparatus;and writing connection information selected from among the firstconnection information corresponding to the first wireless communicationmode in which the image forming apparatus connects to the externalaccess point and the second connection information corresponding to thesecond wireless communication mode in which the image forming apparatusoperates as the access point to the short-range wireless communicator.7. A non-transitory computer-readable storage medium storing a computerprogram for causing a computer to execute a method for controlling animage forming apparatus comprising a short-range wireless communicatorconfigured to execute short-range wireless communication, a wirelesscommunicator operable in a first wireless communication mode in whichthe image forming apparatus connects to an external access point and asecond wireless communication mode in which the image forming apparatusoperates as an access point, wherein a wireless communication beingimplemented by the first wireless communication mode and a wirelesscommunication being implemented by the second wireless communicationmode are different from the short-range wireless communication, and aprocessor, the method comprising: selecting, based on settinginformation of the image forming apparatus, which of first connectioninformation corresponding to the first wireless communication mode andsecond connection information corresponding to the second wirelesscommunication mode is to be written to the short-range wirelesscommunicator such that the connection information written to theshort-range wireless communicator is readable by an external apparatus;and writing connection information selected from among the firstconnection information corresponding to the first wireless communicationmode in which the image forming apparatus connects to the externalaccess point and the second connection information corresponding to thesecond wireless communication mode in which the image forming apparatusoperates as the access point to the short-range wireless communicator.8. The image forming apparatus according to claim 1, further comprising:a display that displays a setting screen for causing a user to set whichof the first connection information and the second connectioninformation is to be written to the short-range wireless communicator,wherein the setting information of the image forming apparatuscorresponds to a setting result received via the setting screen.
 9. Theimage forming apparatus according to claim 1, wherein the firstconnection information includes an SSID of an access point to which theimage forming apparatus has connected.
 10. The image forming apparatusaccording to claim 1, wherein the first connection information includesan SSID of an access point set by the user.